/*
 * vs1011_regs.h
 *
 * Created: 04.01.2012 23:22:20
 *  Author: Luke
 */ 


#ifndef VS1011_REGS_H_
#define VS1011_REGS_H_

#define VS_READ_INSTR 0x03
#define VS_WRITE_INSTR 0x02

/* SCI Register Adresses */
#define SCI_MODE 0x00
#define SCI_STATUS 0x01
#define SCI_BASS 0x02
#define SCI_CLOCKF 0x03
#define SCI_DECODE TIME 0x04
#define SCI_AUDATA 0x05
#define SCI_WRAM 0x06
#define SCI_WRAMADDR 0x07
#define SCI_HDAT0 0x08
#define SCI_HDAT1 0x09
#define SCI_AIADDR 0x0A
#define SCI_VOL 0x0B
#define SCI_AICTRL0 0x0C
#define SCI_AICTRL1 0x0D
#define SCI_AICTRL2 0x0E
#define SCI_AICTRL3 0x0F

/* MODE Register Bits*/
#define SM_DIFF 0x00
#define SM_LAYER12 0x01
#define SM_RESET 0x02
#define SM_OUTOFWAV 0x03
#define SM_SETTOZERO1 0x04
#define SM_TESTS 0x05
#define SM_STREAM 0x06
#define SM_SETTOZERO2 0x07
#define SM_DACT 0x08
#define SM_SDIORD 0x09
#define SM_SDISHARE 0x0A
#define SM_SDINEW 0x0B
#define SM_SETTOZERO3 0x0C
#define SM_SETTOZERO4 0x0D

/* STATUS Register Bits*/
#define SS_AVOL0 0x00
#define SS_AVOL1 0x01
#define SS_APDOWN1 0x02
#define SS_APDOWN2 0x03
#define SS_VER0 0x04
#define SS_VER1 0x05
#define SS_VER2 0x06

/* BASS Register Bits*/
#define SB_FREQLIMIT0 0x00
#define SB_FREQLIMIT1 0x01
#define SB_FREQLIMIT2 0x02
#define SB_FREQLIMIT3 0x03
#define SB_AMPLITUDE0 0x04
#define SB_AMPLITUDE1 0x05
#define SB_AMPLITUDE2 0x06
#define SB_AMPLITUDE3 0x07
#define ST_FREQLIMIT0 0x08
#define ST_FREQLIMIT1 0x09
#define ST_FREQLIMIT2 0x0A
#define ST_FREQLIMIT3 0x0B
#define ST_AMPLITUDE0 0x0C
#define ST_AMPLITUDE1 0x0D
#define ST_AMPLITUDE2 0x0E
#define ST_AMPLITUDE3 0x0F

/* HDAT0/1 Register Bits*/
#define HDAT_EMPHASIS0 0x00
#define HDAT_EMPHASIS1 0x01
#define HDAT_ORIGINAL 0x02
#define HDAT_COPYRIGHT 0x03
#define HDAT_EXTENSION0 0x04
#define HDAT_EXTENSION1 0x05
#define HDAT_MODE0 0x06
#define HDAT_MODE1 0x07
#define HDAT_PAD 0x09
#define HDAT_SAMPLERATE0 0x0A
#define HDAT_SAMPLERATE1 0x0B
#define HDAT_BITRATE0 0x0C
#define HDAT_BITRATE1 0x0D
#define HDAT_BITRATE2 0x0E
#define HDAT_BITRATE3 0x0F

#define HDAT_PROTECT 0x00
#define HDAT_LAYER0 0x01
#define HDAT_LAYER1 0x02
#define HDAT_ID0 0x03
#define HDAT_ID1 0x04
#define HDAT_SYNCWORD0 0x05
#define HDAT_SYNCWORD1 0x06
#define HDAT_SYNCWORD2 0x07
#define HDAT_SYNCWORD3 0x08
#define HDAT_SYNCWORD4 0x09
#define HDAT_SYNCWORD5 0x0A
#define HDAT_SYNCWORD6 0x0B
#define HDAT_SYNCWORD7 0x0C
#define HDAT_SYNCWORD8 0x0D
#define HDAT_SYNCWORD9 0x0E
#define HDAT_SYNCWORD10 0x0F



#endif /* VS1011_REGS_H_ */